Many applications exist where it is desirable to turn on a light, or to take some other electrical power action, in response to a physical state (e.g., a position) of an object. For example, a typical automobile uses a mechanical switch to sense an open door, and in response to closure of the mechanical switch, a light inside the automobile is turned on.
Mechanical switches tend to be expensive and subject to wear and corrosion. Mechanical switches can fail.
It would be desirable to sense the physical state (e.g., open or closed) of an object (e.g., a door) without a mechanical switch and to take an electrical action, e.g., turn on a light, in response thereto.